package whf.framework.util.images;

import whf.framework.util.StringUtils;

/**
 * 缩放属性
 * @author wanghaifeng
 * @create Nov 24, 2006 12:47:05 PM
 * 
 */
public class ScaleProperty {
	private int width;

	private int height;

	private float scale;

	private int maxWidth;

	private int maxHeight;
	
	public ScaleProperty(float scale){
		this.scale = scale;
	}
	
	public ScaleProperty(float scale, int maxWidth, int maxHeight){
		this(scale);
		this.maxHeight = maxHeight;
		this.maxWidth = maxWidth;
	}
	
	public ScaleProperty(int width, int height){
		this.width = width;
		this.height = height;
	}
	/**
	 * @return Returns the height.
	 */
	public int getHeight() {
		return height;
	}

	/**
	 * @param height
	 *            The height to set.
	 */
	public void setHeight(int height) {
		this.height = height;
	}

	/**
	 * @return Returns the maxHeight.
	 */
	public int getMaxHeight() {
		return maxHeight;
	}

	/**
	 * @param maxHeight
	 *            The maxHeight to set.
	 */
	public void setMaxHeight(int maxHeight) {
		this.maxHeight = maxHeight;
	}

	/**
	 * @return Returns the maxWidth.
	 */
	public int getMaxWidth() {
		return maxWidth;
	}

	/**
	 * @param maxWidth
	 *            The maxWidth to set.
	 */
	public void setMaxWidth(int maxWidth) {
		this.maxWidth = maxWidth;
	}

	/**
	 * @return Returns the scale.
	 */
	public float getScale() {
		return scale;
	}

	/**
	 * @param scale
	 *            The scale to set.
	 */
	public void setScale(float scale) {
		this.scale = scale;
	}

	/**
	 * @return Returns the width.
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * @param width
	 *            The width to set.
	 */
	public void setWidth(int width) {
		this.width = width;
	}

	public String toString(){
		return StringUtils.buildToString(this);
	}
}
